package com.lzh.thinkpet.listener;

import com.lzh.thinkpet.controller.IndexController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

/**
 * @author lzh
 * @date 2019/1/22 - 10:07
 */
public class SystemListener implements ServletContextListener {

    private final static Logger logger = LoggerFactory.getLogger(IndexController.class);

    @Override
    public void contextInitialized(ServletContextEvent sce) {
//        System.out.println("SystemListener===>ServletContext (application)上下文初始化");
        logger.info("SystemListener===>ServletContext (application)上下文初始化");
    }

    @Override
    public void contextDestroyed(ServletContextEvent sce) {
//        System.out.println("SystemListener===>ServletContext (application)上下文销毁");
        logger.info("SystemListener===>ServletContext (application)上下文销毁");
    }
}
